home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / dvunit.arc / DVTEST.PAS < prev    next >
Pascal/Delphi Source File  |  1990-09-17  |  2KB  |  46 lines

  1. Program DVTest;
  2. uses crt, desqview;
  3. var c : char;
  4. begin
  5.   IF Dv_Loaded THEN BEGIN
  6.     ClrScr;
  7.     Writeln('Detected DESQview version ',Hi(Dv_Version)+Lo(Dv_Version)/100:4:2);
  8.     Writeln;
  9.     Writeln('Beginning DESQview test.');
  10.     Writeln;
  11.     Writeln('First we will test the DV_Pause function.  This function gives');
  12.     Writeln('up time slices when waiting for input.');
  13.     Writeln;
  14.     Writeln('We are now looping and waiting for keyboard input WITHOUT giving');
  15.     Writeln('up time slices.  Open another window now and run SI and take note');
  16.     Writeln('of the SI rating.');
  17.     Writeln('PRESS ANY KEY WHEN READY');
  18.     REPEAT UNTIL KEYPRESSED;
  19.     c:=readkey;
  20.     ClrScr;
  21.     Writeln('Good, now this time we will give up time slices while waiting for');
  22.     Writeln('keyboard input.  Open a window again and record the SI rating.');
  23.     Writeln('It should be higher.');
  24.     Writeln('PRESS ANY KEY WHEN READY');
  25.     REPEAT
  26.       Dv_Pause;
  27.     UNTIL KeyPressed;
  28.     c:=readkey;
  29.     ClrScr;
  30.     Writeln('Ok, now we will test the Dv_Begin_Critical .. Dv_End_Critical procs.');
  31.     Writeln('Dv_Begin_Critical suspends all other tasks and they stay suspended');
  32.     Writeln('until we do a Dv_End_Critical.  Open another window and start a task');
  33.     Writeln('that does something.  Type a large text file for example.  Then, while');
  34.     Writeln('that task is executing, switch back to this window and hit a key.');
  35.     Writeln('The other task should freeze for five seconds and then resume.');
  36.     Writeln('PRESS ANY KEY WHEN READY');
  37.     repeat until keypressed;
  38.     c:=readkey;
  39.     Dv_Begin_Critical;
  40.     Delay(5000);
  41.     DV_End_Critical;
  42.     Writeln('The other task should continue now.');
  43.     Writeln;
  44.     Writeln('End of DESQview unit test.');
  45.   END ELSE Writeln('No DESQview!');
  46. end.